﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using PracticeAzure.Website.Shared;

namespace PracticeAzure.Website.Models
{
    public class HomeSamplesViewModel
    {
        public SampleItem SamplesAll { get; set; }

        public IList<SampleItem> Samples { get; set; }

        public HomeSamplesViewModel()
        {
            Samples = new List<SampleItem>();
        }

        public class SampleItem
        {
            public string Uri { get; set; }

            public string Name { get; set; }

            public string Description { get; set; }

            public SampleItem(string name, string description)
            {
                Name = name;
                Description = description;
                Uri = GlobalConfiguration.GetBlobAbsoluteUrl(GlobalConfiguration.SamplesContainerName, Name);
            }
        }
    }
}